home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 22 / AMUG_22-4.ISO / Files IV / Prog / T / TinyTools-2.sit / TinyTools / StdTextField.c < prev    next >
MacBinary  |  1997-10-07  |  5.1 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Oct 7 03:07:37 1997, modified Tue Oct 7 03:07:37 1997, creator 'MPS ', type ASCII, 4517 bytes "StdTextField.c" , at 0x1225 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% dearkID deark: macbinary default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 53 74 64 54 65 78 | 74 46 69 65 6c 64 2e 63 |..StdTex|tField.c|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 11 a5 00 | 00 01 ac b0 5f 90 39 b0 |........|...._.9.|
|00000060| 5f 90 39 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |_.9.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 5e ea 00 00 |........|....^...|
|00000080| 2f 2a 20 66 69 6c 65 20 | 53 74 64 54 65 78 74 46 |/* file |StdTextF|
|00000090| 69 65 6c 64 2e 68 20 43 | 6f 70 79 72 69 67 68 74 |ield.h C|opyright|
|000000a0| 20 28 43 29 20 31 39 39 | 36 2c 20 31 39 39 37 20 | (C) 199|6, 1997 |
|000000b0| 62 79 20 4a 6f 68 6e 20 | 52 2e 20 4d 6f 6e 74 62 |by John |R. Montb|
|000000c0| 72 69 61 6e 64 2e 20 20 | 41 6c 6c 20 52 69 67 68 |riand. |All Righ|
|000000d0| 74 73 20 52 65 73 65 72 | 76 65 64 2e 0d 09 73 69 |ts Reser|ved...si|
|000000e0| 6d 70 6c 65 20 74 65 78 | 74 20 66 69 65 6c 64 20 |mple tex|t field |
|000000f0| 6f 70 65 72 61 74 69 6f | 6e 73 2c 20 69 6d 70 6c |operatio|ns, impl|
|00000100| 65 6d 65 6e 74 61 74 69 | 6f 6e 2e 0d 09 43 6f 70 |ementati|on...Cop|
|00000110| 79 72 69 67 68 74 20 28 | 63 29 20 31 39 39 37 20 |yright (|c) 1997 |
|00000120| 62 79 20 4a 6f 68 6e 20 | 4d 6f 6e 74 62 72 69 61 |by John |Montbria|
|00000130| 6e 64 2e 20 20 41 6c 6c | 20 52 69 67 68 74 73 20 |nd. All| Rights |
|00000140| 52 65 73 65 72 76 65 64 | 2e 0d 09 50 65 72 6d 69 |Reserved|...Permi|
|00000150| 73 73 69 6f 6e 20 67 72 | 61 6e 74 65 64 20 66 6f |ssion gr|anted fo|
|00000160| 72 20 70 75 62 6c 69 63 | 20 75 73 65 2e 0d 09 44 |r public| use...D|
|00000170| 69 73 74 72 69 62 75 74 | 65 20 66 72 65 65 6c 79 |istribut|e freely|
|00000180| 20 69 6e 20 61 72 65 61 | 73 20 77 68 65 72 65 20 | in area|s where |
|00000190| 74 68 65 20 6c 61 77 73 | 20 6f 66 20 63 6f 70 79 |the laws| of copy|
|000001a0| 72 69 67 68 74 20 61 70 | 70 6c 79 2e 0d 09 55 53 |right ap|ply...US|
|000001b0| 45 20 41 54 20 59 4f 55 | 52 20 4f 57 4e 20 52 49 |E AT YOU|R OWN RI|
|000001c0| 53 4b 2e 0d 09 44 4f 20 | 4e 4f 54 20 44 49 53 54 |SK...DO |NOT DIST|
|000001d0| 52 49 42 55 54 45 20 4d | 4f 44 49 46 49 45 44 20 |RIBUTE M|ODIFIED |
|000001e0| 43 4f 50 49 45 53 2e 0d | 09 43 6f 6d 6d 65 6e 74 |COPIES..|.Comment|
|000001f0| 73 2f 71 75 65 73 74 69 | 6f 6e 73 2f 70 6f 73 74 |s/questi|ons/post|
|00000200| 63 61 72 64 73 20 74 6f | 20 74 68 65 20 61 75 74 |cards to| the aut|
|00000210| 68 6f 72 20 61 74 20 74 | 68 65 20 61 64 64 72 65 |hor at t|he addre|
|00000220| 73 73 3a 0d 09 09 4a 6f | 68 6e 20 4d 6f 6e 74 62 |ss:...Jo|hn Montb|
|00000230| 72 69 61 6e 64 0d 09 09 | 50 2e 4f 2e 20 42 6f 78 |riand...|P.O. Box|
|00000240| 2e 20 31 31 33 33 0d 09 | 09 53 61 73 6b 61 74 6f |. 1133..|.Saskato|
|00000250| 6f 6e 20 53 61 73 6b 61 | 74 63 68 65 77 61 6e 20 |on Saska|tchewan |
|00000260| 43 61 6e 61 64 61 0d 09 | 09 53 37 4b 20 33 4e 32 |Canada..|.S7K 3N2|
|00000270| 0d 09 6f 72 20 62 79 20 | 65 6d 61 69 6c 20 61 74 |..or by |email at|
|00000280| 3a 0d 09 09 74 69 6e 79 | 6a 6f 68 6e 40 73 6b 2e |:...tiny|john@sk.|
|00000290| 73 79 6d 70 61 74 69 63 | 6f 2e 63 61 0d 09 49 66 |sympatic|o.ca..If|
|000002a0| 20 79 6f 75 20 77 6f 75 | 6c 64 20 6c 69 6b 65 20 | you wou|ld like |
|000002b0| 74 6f 20 68 61 76 65 3a | 0d 09 09 74 65 63 68 6e |to have:|...techn|
|000002c0| 69 63 61 6c 20 73 75 70 | 70 6f 72 74 20 72 65 67 |ical sup|port reg|
|000002d0| 61 72 64 69 6e 67 20 74 | 68 69 73 20 66 69 6c 65 |arding t|his file|
|000002e0| 2c 20 73 65 6e 64 20 61 | 20 70 6f 73 74 63 61 72 |, send a| postcar|
|000002f0| 64 2e 0d 09 73 65 65 20 | 61 6c 73 6f 3a 0d 09 09 |d...see |also:...|
|00000300| 68 74 74 70 3a 2f 2f 77 | 77 77 33 2e 73 6b 2e 73 |http://w|ww3.sk.s|
|00000310| 79 6d 70 61 74 69 63 6f | 2e 63 61 2f 74 69 6e 79 |ympatico|.ca/tiny|
|00000320| 6a 6f 68 6e 0d 2a 2f 0d | 0d 23 69 6e 63 6c 75 64 |john.*/.|.#includ|
|00000330| 65 20 22 53 74 64 54 65 | 78 74 46 69 65 6c 64 2e |e "StdTe|xtField.|
|00000340| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 3c 4f 53 55 |h".#incl|ude <OSU|
|00000350| 74 69 6c 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |tils.h>.|#include|
|00000360| 20 3c 54 65 78 74 55 74 | 69 6c 73 2e 68 3e 0d 23 | <TextUt|ils.h>.#|
|00000370| 69 6e 63 6c 75 64 65 20 | 3c 4d 65 6d 6f 72 79 2e |include |<Memory.|
|00000380| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 53 74 72 |h>.#incl|ude <Str|
|00000390| 69 6e 67 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |ing.h>.#|include |
|000003a0| 3c 53 74 72 69 6e 67 73 | 2e 68 3e 0d 0d 0d 73 74 |<Strings|.h>...st|
|000003b0| 61 74 69 63 20 52 65 63 | 74 20 67 49 6e 76 69 73 |atic Rec|t gInvis|
|000003c0| 69 62 6c 65 52 65 63 74 | 20 3d 20 7b 2d 31 30 30 |ibleRect| = {-100|
|000003d0| 30 2c 20 2d 31 30 30 30 | 2c 20 2d 39 30 30 2c 20 |0, -1000|, -900, |
|000003e0| 2d 39 30 30 7d 3b 0d 0d | 54 65 78 74 46 69 65 6c |-900};..|TextFiel|
|000003f0| 64 48 61 6e 64 6c 65 20 | 4e 65 77 54 65 78 74 46 |dHandle |NewTextF|
|00000400| 69 65 6c 64 28 57 69 6e | 64 6f 77 50 74 72 20 77 |ield(Win|dowPtr w|
|00000410| 69 6e 64 6f 77 2c 20 54 | 65 78 74 46 69 6c 74 65 |indow, T|extFilte|
|00000420| 72 50 72 6f 63 20 66 69 | 6c 74 65 72 2c 20 6c 6f |rProc fi|lter, lo|
|00000430| 6e 67 20 70 61 72 61 6d | 29 20 7b 0d 09 54 65 78 |ng param|) {..Tex|
|00000440| 74 46 69 65 6c 64 20 64 | 61 74 61 3b 0d 09 54 65 |tField d|ata;..Te|
|00000450| 78 74 46 69 65 6c 64 48 | 61 6e 64 6c 65 20 72 65 |xtFieldH|andle re|
|00000460| 73 75 6c 74 3b 0d 09 53 | 65 74 50 6f 72 74 28 77 |sult;..S|etPort(w|
|00000470| 69 6e 64 6f 77 29 3b 0d | 09 64 61 74 61 2e 6f 77 |indow);.|.data.ow|
|00000480| 6e 65 72 20 3d 20 77 69 | 6e 64 6f 77 3b 0d 09 64 |ner = wi|ndow;..d|
|00000490| 61 74 61 2e 68 54 45 20 | 3d 20 54 45 4e 65 77 28 |ata.hTE |= TENew(|
|000004a0| 26 67 49 6e 76 69 73 69 | 62 6c 65 52 65 63 74 2c |&gInvisi|bleRect,|
|000004b0| 20 26 67 49 6e 76 69 73 | 69 62 6c 65 52 65 63 74 | &gInvis|ibleRect|
|000004c0| 29 3b 0d 09 64 61 74 61 | 2e 62 6f 75 6e 64 61 72 |);..data|.boundar|
|000004d0| 79 20 3d 20 67 49 6e 76 | 69 73 69 62 6c 65 52 65 |y = gInv|isibleRe|
|000004e0| 63 74 3b 0d 09 64 61 74 | 61 2e 66 69 6c 74 20 3d |ct;..dat|a.filt =|
|000004f0| 20 66 69 6c 74 65 72 3b | 0d 09 64 61 74 61 2e 61 | filter;|..data.a|
|00000500| 63 74 69 76 65 20 3d 20 | 30 3b 0d 09 64 61 74 61 |ctive = |0;..data|
|00000510| 2e 70 61 72 61 6d 20 3d | 20 70 61 72 61 6d 3b 0d |.param =| param;.|
|00000520| 09 50 74 72 54 6f 48 61 | 6e 64 28 26 64 61 74 61 |.PtrToHa|nd(&data|
|00000530| 2c 20 28 48 61 6e 64 6c | 65 2a 29 20 26 72 65 73 |, (Handl|e*) &res|
|00000540| 75 6c 74 2c 20 73 69 7a | 65 6f 66 28 64 61 74 61 |ult, siz|eof(data|
|00000550| 29 29 3b 0d 09 72 65 74 | 75 72 6e 20 72 65 73 75 |));..ret|urn resu|
|00000560| 6c 74 3b 0d 7d 0d 0d 76 | 6f 69 64 20 44 69 73 70 |lt;.}..v|oid Disp|
|00000570| 6f 73 65 54 65 78 74 46 | 69 65 6c 64 28 54 65 78 |oseTextF|ield(Tex|
|00000580| 74 46 69 65 6c 64 48 61 | 6e 64 6c 65 20 74 78 74 |tFieldHa|ndle txt|
|00000590| 29 20 7b 0d 09 54 45 44 | 69 73 70 6f 73 65 28 28 |) {..TED|ispose((|
|000005a0| 2a 2a 74 78 74 29 2e 68 | 54 45 29 3b 0d 09 44 69 |**txt).h|TE);..Di|
|000005b0| 73 70 6f 73 65 48 61 6e | 64 6c 65 28 28 48 61 6e |sposeHan|dle((Han|
|000005c0| 64 6c 65 29 20 74 78 74 | 29 3b 0d 7d 0d 0d 76 6f |dle) txt|);.}..vo|
|000005d0| 69 64 20 54 46 53 65 74 | 42 6f 75 6e 64 73 28 54 |id TFSet|Bounds(T|
|000005e0| 65 78 74 46 69 65 6c 64 | 48 61 6e 64 6c 65 20 74 |extField|Handle t|
|000005f0| 78 74 2c 20 52 65 63 74 | 20 2a 62 6f 75 6e 64 73 |xt, Rect| *bounds|
|00000600| 29 20 7b 0d 09 54 45 48 | 61 6e 64 6c 65 20 74 65 |) {..TEH|andle te|
|00000610| 78 74 3b 0d 09 74 65 78 | 74 20 3d 20 28 2a 2a 74 |xt;..tex|t = (**t|
|00000620| 78 74 29 2e 68 54 45 3b | 0d 09 69 66 20 28 62 6f |xt).hTE;|..if (bo|
|00000630| 75 6e 64 73 20 3d 3d 20 | 4e 55 4c 4c 29 0d 09 09 |unds == |NULL)...|
|00000640| 28 2a 2a 74 78 74 29 2e | 62 6f 75 6e 64 61 72 79 |(**txt).|boundary|
|00000650| 20 3d 20 28 2a 2a 74 65 | 78 74 29 2e 64 65 73 74 | = (**te|xt).dest|
|00000660| 52 65 63 74 20 3d 20 28 | 2a 2a 74 65 78 74 29 2e |Rect = (|**text).|
|00000670| 76 69 65 77 52 65 63 74 | 20 3d 20 67 49 6e 76 69 |viewRect| = gInvi|
|00000680| 73 69 62 6c 65 52 65 63 | 74 3b 0d 09 65 6c 73 65 |sibleRec|t;..else|
|00000690| 20 28 2a 2a 74 78 74 29 | 2e 62 6f 75 6e 64 61 72 | (**txt)|.boundar|
|000006a0| 79 20 3d 20 28 2a 2a 74 | 65 78 74 29 2e 64 65 73 |y = (**t|ext).des|
|000006b0| 74 52 65 63 74 20 3d 20 | 28 2a 2a 74 65 78 74 29 |tRect = |(**text)|
|000006c0| 2e 76 69 65 77 52 65 63 | 74 20 3d 20 2a 62 6f 75 |.viewRec|t = *bou|
|000006d0| 6e 64 73 3b 0d 09 54 45 | 43 61 6c 54 65 78 74 28 |nds;..TE|CalText(|
|000006e0| 74 65 78 74 29 3b 0d 7d | 0d 0d 52 65 63 74 2a 20 |text);.}|..Rect* |
|000006f0| 54 46 47 65 74 42 6f 75 | 6e 64 73 28 54 65 78 74 |TFGetBou|nds(Text|
|00000700| 46 69 65 6c 64 48 61 6e | 64 6c 65 20 74 78 74 2c |FieldHan|dle txt,|
|00000710| 20 52 65 63 74 20 2a 62 | 6f 75 6e 64 73 29 20 7b | Rect *b|ounds) {|
|00000720| 0d 09 2a 62 6f 75 6e 64 | 73 20 3d 20 28 2a 2a 74 |..*bound|s = (**t|
|00000730| 78 74 29 2e 62 6f 75 6e | 64 61 72 79 3b 0d 09 72 |xt).boun|dary;..r|
|00000740| 65 74 75 72 6e 20 62 6f | 75 6e 64 73 3b 0d 7d 0d |eturn bo|unds;.}.|
|00000750| 0d 6c 6f 6e 67 20 54 46 | 47 65 74 54 65 78 74 28 |.long TF|GetText(|
|00000760| 54 65 78 74 46 69 65 6c | 64 48 61 6e 64 6c 65 20 |TextFiel|dHandle |
|00000770| 74 78 74 2c 20 6c 6f 6e | 67 20 2a 63 6f 75 6e 74 |txt, lon|g *count|
|00000780| 2c 20 63 68 61 72 2a 20 | 74 68 65 74 65 78 74 29 |, char* |thetext)|
|00000790| 20 7b 0d 09 43 68 61 72 | 73 48 61 6e 64 6c 65 20 | {..Char|sHandle |
|000007a0| 74 68 65 63 68 61 72 73 | 3b 20 0d 09 6c 6f 6e 67 |thechars|; ..long|
|000007b0| 20 74 68 65 6c 65 6e 67 | 74 68 3b 0d 09 74 68 65 | theleng|th;..the|
|000007c0| 63 68 61 72 73 20 3d 20 | 54 45 47 65 74 54 65 78 |chars = |TEGetTex|
|000007d0| 74 28 28 2a 2a 74 78 74 | 29 2e 68 54 45 29 3b 0d |t((**txt|).hTE);.|
|000007e0| 09 74 68 65 6c 65 6e 67 | 74 68 20 3d 20 47 65 74 |.theleng|th = Get|
|000007f0| 48 61 6e 64 6c 65 53 69 | 7a 65 28 28 48 61 6e 64 |HandleSi|ze((Hand|
|00000800| 6c 65 29 20 74 68 65 63 | 68 61 72 73 29 3b 0d 09 |le) thec|hars);..|
|00000810| 69 66 20 28 63 6f 75 6e | 74 20 21 3d 20 4e 55 4c |if (coun|t != NUL|
|00000820| 4c 29 20 7b 0d 09 09 69 | 66 20 28 2a 63 6f 75 6e |L) {...i|f (*coun|
|00000830| 74 20 3e 20 74 68 65 6c | 65 6e 67 74 68 29 20 2a |t > thel|ength) *|
|00000840| 63 6f 75 6e 74 20 3d 20 | 74 68 65 6c 65 6e 67 74 |count = |thelengt|
|00000850| 68 3b 20 65 6c 73 65 20 | 74 68 65 6c 65 6e 67 74 |h; else |thelengt|
|00000860| 68 20 3d 20 2a 63 6f 75 | 6e 74 3b 0d 09 09 69 66 |h = *cou|nt;...if|
|00000870| 20 28 74 68 65 74 65 78 | 74 20 21 3d 20 4e 55 4c | (thetex|t != NUL|
|00000880| 4c 29 20 42 6c 6f 63 6b | 4d 6f 76 65 44 61 74 61 |L) Block|MoveData|
|00000890| 28 2a 74 68 65 63 68 61 | 72 73 2c 20 74 68 65 74 |(*thecha|rs, thet|
|000008a0| 65 78 74 2c 20 74 68 65 | 6c 65 6e 67 74 68 29 3b |ext, the|length);|
|000008b0| 0d 09 7d 0d 09 72 65 74 | 75 72 6e 20 74 68 65 6c |..}..ret|urn thel|
|000008c0| 65 6e 67 74 68 3b 0d 7d | 0d 0d 76 6f 69 64 20 54 |ength;.}|..void T|
|000008d0| 46 53 65 74 54 65 78 74 | 28 54 65 78 74 46 69 65 |FSetText|(TextFie|
|000008e0| 6c 64 48 61 6e 64 6c 65 | 20 74 78 74 2c 20 6c 6f |ldHandle| txt, lo|
|000008f0| 6e 67 20 63 6f 75 6e 74 | 2c 20 63 68 61 72 2a 20 |ng count|, char* |
|00000900| 74 68 65 74 65 78 74 29 | 20 7b 0d 09 54 45 53 65 |thetext)| {..TESe|
|00000910| 74 53 65 6c 65 63 74 28 | 30 2c 20 33 30 30 30 30 |tSelect(|0, 30000|
|00000920| 2c 20 28 2a 2a 74 78 74 | 29 2e 68 54 45 29 3b 0d |, (**txt|).hTE);.|
|00000930| 09 54 45 44 65 6c 65 74 | 65 28 28 2a 2a 74 78 74 |.TEDelet|e((**txt|
|00000940| 29 2e 68 54 45 29 3b 0d | 09 54 45 53 65 74 54 65 |).hTE);.|.TESetTe|
|00000950| 78 74 28 74 68 65 74 65 | 78 74 2c 20 63 6f 75 6e |xt(thete|xt, coun|
|00000960| 74 2c 20 28 2a 2a 74 78 | 74 29 2e 68 54 45 29 3b |t, (**tx|t).hTE);|
|00000970| 0d 09 54 45 53 65 74 53 | 65 6c 65 63 74 28 30 2c |..TESetS|elect(0,|
|00000980| 20 33 30 30 30 30 2c 20 | 28 2a 2a 74 78 74 29 2e | 30000, |(**txt).|
|00000990| 68 54 45 29 3b 20 0d 7d | 0d 0d 0d 76 6f 69 64 20 |hTE); .}|...void |
|000009a0| 54 46 41 63 74 69 76 61 | 74 65 28 54 65 78 74 46 |TFActiva|te(TextF|
|000009b0| 69 65 6c 64 48 61 6e 64 | 6c 65 20 74 78 74 2c 20 |ieldHand|le txt, |
|000009c0| 42 6f 6f 6c 65 61 6e 20 | 69 73 61 63 74 69 76 65 |Boolean |isactive|
|000009d0| 29 20 7b 0d 09 42 6f 6f | 6c 65 61 6e 20 77 61 73 |) {..Boo|lean was|
|000009e0| 61 63 74 69 76 65 2c 20 | 6e 6f 77 61 63 74 69 76 |active, |nowactiv|
|000009f0| 65 3b 0d 09 77 61 73 61 | 63 74 69 76 65 20 3d 20 |e;..wasa|ctive = |
|00000a00| 28 28 2a 2a 74 78 74 29 | 2e 61 63 74 69 76 65 20 |((**txt)|.active |
|00000a10| 3d 3d 20 31 29 3b 0d 09 | 69 66 20 28 69 73 61 63 |== 1);..|if (isac|
|00000a20| 74 69 76 65 29 20 28 2a | 2a 74 78 74 29 2e 61 63 |tive) (*|*txt).ac|
|00000a30| 74 69 76 65 20 2b 3d 20 | 31 3b 20 65 6c 73 65 20 |tive += |1; else |
|00000a40| 28 2a 2a 74 78 74 29 2e | 61 63 74 69 76 65 20 2d |(**txt).|active -|
|00000a50| 3d 20 31 3b 0d 09 6e 6f | 77 61 63 74 69 76 65 20 |= 1;..no|wactive |
|00000a60| 3d 20 28 28 2a 2a 74 78 | 74 29 2e 61 63 74 69 76 |= ((**tx|t).activ|
|00000a70| 65 20 3d 3d 20 31 29 3b | 0d 09 69 66 20 28 77 61 |e == 1);|..if (wa|
|00000a80| 73 61 63 74 69 76 65 20 | 5e 20 6e 6f 77 61 63 74 |sactive |^ nowact|
|00000a90| 69 76 65 29 20 7b 0d 09 | 09 69 66 20 28 6e 6f 77 |ive) {..|.if (now|
|00000aa0| 61 63 74 69 76 65 29 20 | 54 45 41 63 74 69 76 61 |active) |TEActiva|
|00000ab0| 74 65 28 28 2a 2a 74 78 | 74 29 2e 68 54 45 29 3b |te((**tx|t).hTE);|
|00000ac0| 20 65 6c 73 65 20 54 45 | 44 65 61 63 74 69 76 61 | else TE|Deactiva|
|00000ad0| 74 65 28 28 2a 2a 74 78 | 74 29 2e 68 54 45 29 3b |te((**tx|t).hTE);|
|00000ae0| 0d 09 7d 0d 7d 0d 0d 76 | 6f 69 64 20 54 46 55 70 |..}.}..v|oid TFUp|
|00000af0| 64 61 74 65 28 54 65 78 | 74 46 69 65 6c 64 48 61 |date(Tex|tFieldHa|
|00000b00| 6e 64 6c 65 20 74 78 74 | 29 20 7b 0d 09 52 65 63 |ndle txt|) {..Rec|
|00000b10| 74 20 62 6f 75 6e 64 73 | 3b 0d 09 53 65 74 50 6f |t bounds|;..SetPo|
|00000b20| 72 74 28 28 2a 2a 74 78 | 74 29 2e 6f 77 6e 65 72 |rt((**tx|t).owner|
|00000b30| 29 3b 0d 09 62 6f 75 6e | 64 73 20 3d 20 28 2a 2a |);..boun|ds = (**|
|00000b40| 74 78 74 29 2e 62 6f 75 | 6e 64 61 72 79 3b 0d 09 |txt).bou|ndary;..|
|00000b50| 54 45 55 70 64 61 74 65 | 28 26 62 6f 75 6e 64 73 |TEUpdate|(&bounds|
|00000b60| 2c 20 28 2a 2a 74 78 74 | 29 2e 68 54 45 29 3b 0d |, (**txt|).hTE);.|
|00000b70| 7d 0d 0d 76 6f 69 64 20 | 54 46 4b 65 79 28 54 65 |}..void |TFKey(Te|
|00000b80| 78 74 46 69 65 6c 64 48 | 61 6e 64 6c 65 20 74 78 |xtFieldH|andle tx|
|00000b90| 74 2c 20 63 68 61 72 20 | 63 68 29 20 7b 0d 09 69 |t, char |ch) {..i|
|00000ba0| 66 20 28 28 2a 2a 74 78 | 74 29 2e 61 63 74 69 76 |f ((**tx|t).activ|
|00000bb0| 65 20 3d 3d 20 31 29 20 | 7b 0d 09 09 69 66 20 28 |e == 1) |{...if (|
|00000bc0| 28 2a 2a 74 78 74 29 2e | 66 69 6c 74 20 21 3d 20 |(**txt).|filt != |
|00000bd0| 4e 55 4c 4c 29 20 7b 0d | 09 09 09 69 66 20 28 28 |NULL) {.|...if ((|
|00000be0| 2a 2a 74 78 74 29 2e 66 | 69 6c 74 28 63 68 2c 20 |**txt).f|ilt(ch, |
|00000bf0| 28 2a 2a 74 78 74 29 2e | 70 61 72 61 6d 29 29 20 |(**txt).|param)) |
|00000c00| 7b 0d 09 09 09 09 53 79 | 73 42 65 65 70 28 31 29 |{.....Sy|sBeep(1)|
|00000c10| 3b 0d 09 09 09 09 72 65 | 74 75 72 6e 3b 0d 09 09 |;.....re|turn;...|
|00000c20| 09 7d 0d 09 09 7d 0d 09 | 09 53 65 74 50 6f 72 74 |.}...}..|.SetPort|
|00000c30| 28 28 2a 2a 74 78 74 29 | 2e 6f 77 6e 65 72 29 3b |((**txt)|.owner);|
|00000c40| 0d 09 09 54 45 4b 65 79 | 28 63 68 2c 20 28 2a 2a |...TEKey|(ch, (**|
|00000c50| 74 78 74 29 2e 68 54 45 | 29 3b 0d 09 7d 0d 7d 0d |txt).hTE|);..}.}.|
|00000c60| 0d 76 6f 69 64 20 54 46 | 4d 6f 75 73 65 28 54 65 |.void TF|Mouse(Te|
|00000c70| 78 74 46 69 65 6c 64 48 | 61 6e 64 6c 65 20 74 78 |xtFieldH|andle tx|
|00000c80| 74 2c 20 50 6f 69 6e 74 | 20 77 68 65 72 65 2c 20 |t, Point| where, |
|00000c90| 73 68 6f 72 74 20 6d 6f | 64 69 66 69 65 72 73 29 |short mo|difiers)|
|00000ca0| 20 7b 0d 09 52 65 63 74 | 20 62 6f 75 6e 64 73 3b | {..Rect| bounds;|
|00000cb0| 0d 09 53 65 74 50 6f 72 | 74 28 28 2a 2a 74 78 74 |..SetPor|t((**txt|
|00000cc0| 29 2e 6f 77 6e 65 72 29 | 3b 0d 09 62 6f 75 6e 64 |).owner)|;..bound|
|00000cd0| 73 20 3d 20 28 2a 2a 74 | 78 74 29 2e 62 6f 75 6e |s = (**t|xt).boun|
|00000ce0| 64 61 72 79 3b 0d 09 69 | 66 20 28 50 74 49 6e 52 |dary;..i|f (PtInR|
|00000cf0| 65 63 74 28 77 68 65 72 | 65 2c 20 26 62 6f 75 6e |ect(wher|e, &boun|
|00000d00| 64 73 29 29 20 7b 0d 09 | 09 54 45 43 6c 69 63 6b |ds)) {..|.TEClick|
|00000d10| 28 77 68 65 72 65 2c 20 | 28 6d 6f 64 69 66 69 65 |(where, |(modifie|
|00000d20| 72 73 20 26 20 73 68 69 | 66 74 4b 65 79 29 20 21 |rs & shi|ftKey) !|
|00000d30| 3d 20 30 2c 20 28 2a 2a | 74 78 74 29 2e 68 54 45 |= 0, (**|txt).hTE|
|00000d40| 29 3b 0d 09 7d 0d 7d 0d | 0d 42 6f 6f 6c 65 61 6e |);..}.}.|.Boolean|
|00000d50| 20 54 46 43 75 72 73 6f | 72 28 54 65 78 74 46 69 | TFCurso|r(TextFi|
|00000d60| 65 6c 64 48 61 6e 64 6c | 65 20 74 78 74 2c 20 50 |eldHandl|e txt, P|
|00000d70| 6f 69 6e 74 20 77 68 65 | 72 65 29 20 7b 0d 09 52 |oint whe|re) {..R|
|00000d80| 65 63 74 20 62 6f 75 6e | 64 73 3b 0d 09 43 75 72 |ect boun|ds;..Cur|
|00000d90| 73 48 61 6e 64 6c 65 20 | 20 72 74 78 74 63 75 72 |sHandle | rtxtcur|
|00000da0| 73 6f 72 3b 0d 09 43 75 | 72 73 6f 72 20 74 78 74 |sor;..Cu|rsor txt|
|00000db0| 63 75 72 73 6f 72 3b 0d | 09 53 65 74 50 6f 72 74 |cursor;.|.SetPort|
|00000dc0| 28 28 2a 2a 74 78 74 29 | 2e 6f 77 6e 65 72 29 3b |((**txt)|.owner);|
|00000dd0| 0d 09 62 6f 75 6e 64 73 | 20 3d 20 28 2a 2a 74 78 |..bounds| = (**tx|
|00000de0| 74 29 2e 62 6f 75 6e 64 | 61 72 79 3b 0d 09 54 45 |t).bound|ary;..TE|
|00000df0| 49 64 6c 65 28 28 2a 2a | 74 78 74 29 2e 68 54 45 |Idle((**|txt).hTE|
|00000e00| 29 3b 0d 09 69 66 20 28 | 50 74 49 6e 52 65 63 74 |);..if (|PtInRect|
|00000e10| 28 77 68 65 72 65 2c 20 | 26 62 6f 75 6e 64 73 29 |(where, |&bounds)|
|00000e20| 29 20 7b 0d 09 09 69 66 | 20 28 28 72 74 78 74 63 |) {...if| ((rtxtc|
|00000e30| 75 72 73 6f 72 20 3d 20 | 47 65 74 43 75 72 73 6f |ursor = |GetCurso|
|00000e40| 72 28 69 42 65 61 6d 43 | 75 72 73 6f 72 29 29 20 |r(iBeamC|ursor)) |
|00000e50| 21 3d 20 4e 55 4c 4c 29 | 20 7b 0d 09 09 09 74 78 |!= NULL)| {....tx|
|00000e60| 74 63 75 72 73 6f 72 20 | 3d 20 2a 2a 72 74 78 74 |tcursor |= **rtxt|
|00000e70| 63 75 72 73 6f 72 3b 0d | 09 09 09 53 65 74 43 75 |cursor;.|...SetCu|
|00000e80| 72 73 6f 72 28 26 74 78 | 74 63 75 72 73 6f 72 29 |rsor(&tx|tcursor)|
|00000e90| 3b 0d 09 09 7d 0d 09 09 | 72 65 74 75 72 6e 20 74 |;...}...|return t|
|00000ea0| 72 75 65 3b 0d 09 7d 20 | 65 6c 73 65 20 72 65 74 |rue;..} |else ret|
|00000eb0| 75 72 6e 20 66 61 6c 73 | 65 3b 0d 7d 0d 0d 73 74 |urn fals|e;.}..st|
|00000ec0| 61 74 69 63 20 42 6f 6f | 6c 65 61 6e 20 4e 75 6d |atic Boo|lean Num|
|00000ed0| 65 72 69 63 54 65 78 74 | 46 69 6c 74 65 72 28 63 |ericText|Filter(c|
|00000ee0| 68 61 72 20 63 68 2c 20 | 6c 6f 6e 67 20 70 61 72 |har ch, |long par|
|00000ef0| 61 6d 29 20 7b 0d 09 6c | 6f 6e 67 20 63 68 61 72 |am) {..l|ong char|
|00000f00| 61 63 74 65 72 73 3b 0d | 09 54 65 78 74 46 69 65 |acters;.|.TextFie|
|00000f10| 6c 64 48 61 6e 64 6c 65 | 20 74 78 74 3b 0d 09 74 |ldHandle| txt;..t|
|00000f20| 78 74 20 3d 20 28 54 65 | 78 74 46 69 65 6c 64 48 |xt = (Te|xtFieldH|
|00000f30| 61 6e 64 6c 65 29 20 70 | 61 72 61 6d 3b 0d 09 63 |andle) p|aram;..c|
|00000f40| 68 61 72 61 63 74 65 72 | 73 20 3d 20 54 46 47 65 |haracter|s = TFGe|
|00000f50| 74 54 65 78 74 28 74 78 | 74 2c 20 4e 55 4c 4c 2c |tText(tx|t, NULL,|
|00000f60| 20 4e 55 4c 4c 29 3b 0d | 09 69 66 20 28 63 68 61 | NULL);.|.if (cha|
|00000f70| 72 61 63 74 65 72 73 20 | 3e 3d 20 37 29 0d 09 09 |racters |>= 7)...|
|00000f80| 72 65 74 75 72 6e 20 28 | 63 68 20 21 3d 20 27 5c |return (|ch != '\|
|00000f90| 62 27 29 3b 0d 09 65 6c | 73 65 20 72 65 74 75 72 |b');..el|se retur|
|00000fa0| 6e 20 28 73 74 72 63 68 | 72 28 22 30 31 32 33 34 |n (strch|r("01234|
|00000fb0| 35 36 37 38 39 5c 62 22 | 2c 20 63 68 29 20 3d 3d |56789\b"|, ch) ==|
|00000fc0| 20 4e 55 4c 4c 29 3b 0d | 7d 0d 0d 0d 54 65 78 74 | NULL);.|}...Text|
|00000fd0| 46 69 65 6c 64 48 61 6e | 64 6c 65 20 4e 65 77 4e |FieldHan|dle NewN|
|00000fe0| 75 6d 65 72 69 63 54 65 | 78 74 46 69 65 6c 64 28 |umericTe|xtField(|
|00000ff0| 57 69 6e 64 6f 77 50 74 | 72 20 77 69 6e 64 6f 77 |WindowPt|r window|
|00001000| 29 20 7b 0d 09 54 65 78 | 74 46 69 65 6c 64 48 61 |) {..Tex|tFieldHa|
|00001010| 6e 64 6c 65 20 74 78 74 | 3b 0d 09 74 78 74 20 3d |ndle txt|;..txt =|
|00001020| 20 4e 65 77 54 65 78 74 | 46 69 65 6c 64 28 77 69 | NewText|Field(wi|
|00001030| 6e 64 6f 77 2c 20 4e 75 | 6d 65 72 69 63 54 65 78 |ndow, Nu|mericTex|
|00001040| 74 46 69 6c 74 65 72 2c | 20 30 29 3b 0d 09 28 2a |tFilter,| 0);..(*|
|00001050| 2a 74 78 74 29 2e 70 61 | 72 61 6d 20 3d 20 28 6c |*txt).pa|ram = (l|
|00001060| 6f 6e 67 29 20 74 78 74 | 3b 0d 09 54 45 53 65 74 |ong) txt|;..TESet|
|00001070| 41 6c 69 67 6e 6d 65 6e | 74 28 74 65 46 6c 75 73 |Alignmen|t(teFlus|
|00001080| 68 52 69 67 68 74 2c 20 | 28 2a 2a 74 78 74 29 2e |hRight, |(**txt).|
|00001090| 68 54 45 29 3b 20 0d 09 | 72 65 74 75 72 6e 20 74 |hTE); ..|return t|
|000010a0| 78 74 3b 0d 7d 0d 0d 6c | 6f 6e 67 20 4e 54 46 47 |xt;.}..l|ong NTFG|
|000010b0| 65 74 56 61 6c 75 65 28 | 54 65 78 74 46 69 65 6c |etValue(|TextFiel|
|000010c0| 64 48 61 6e 64 6c 65 20 | 74 78 74 29 20 7b 0d 09 |dHandle |txt) {..|
|000010d0| 63 68 61 72 20 73 5b 32 | 35 36 5d 3b 0d 09 6c 6f |char s[2|56];..lo|
|000010e0| 6e 67 20 63 6f 75 6e 74 | 2c 20 6e 3b 0d 09 54 46 |ng count|, n;..TF|
|000010f0| 47 65 74 54 65 78 74 28 | 74 78 74 2c 20 28 63 6f |GetText(|txt, (co|
|00001100| 75 6e 74 20 3d 20 28 73 | 69 7a 65 6f 66 28 73 29 |unt = (s|izeof(s)|
|00001110| 2d 31 29 2c 20 26 63 6f | 75 6e 74 29 2c 20 73 29 |-1), &co|unt), s)|
|00001120| 3b 0d 09 69 66 20 28 63 | 6f 75 6e 74 20 3d 3d 20 |;..if (c|ount == |
|00001130| 30 29 20 72 65 74 75 72 | 6e 20 30 3b 0d 09 73 5b |0) retur|n 0;..s[|
|00001140| 63 6f 75 6e 74 5d 20 3d | 20 27 5c 30 27 3b 0d 09 |count] =| '\0';..|
|00001150| 53 74 72 69 6e 67 54 6f | 4e 75 6d 28 63 32 70 73 |StringTo|Num(c2ps|
|00001160| 74 72 28 73 29 2c 20 26 | 6e 29 3b 0d 09 72 65 74 |tr(s), &|n);..ret|
|00001170| 75 72 6e 20 6e 3b 0d 7d | 0d 0d 76 6f 69 64 20 4e |urn n;.}|..void N|
|00001180| 54 46 53 65 74 56 61 6c | 75 65 28 54 65 78 74 46 |TFSetVal|ue(TextF|
|00001190| 69 65 6c 64 48 61 6e 64 | 6c 65 20 74 78 74 2c 20 |ieldHand|le txt, |
|000011a0| 6c 6f 6e 67 20 76 61 6c | 75 65 29 20 7b 0d 09 63 |long val|ue) {..c|
|000011b0| 68 61 72 20 73 5b 32 35 | 36 5d 3b 0d 09 4e 75 6d |har s[25|6];..Num|
|000011c0| 54 6f 53 74 72 69 6e 67 | 28 76 61 6c 75 65 2c 20 |ToString|(value, |
|000011d0| 28 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 2a 29 |(unsigne|d char*)|
|000011e0| 20 73 29 3b 0d 09 70 32 | 63 73 74 72 28 28 75 6e | s);..p2|cstr((un|
|000011f0| 73 69 67 6e 65 64 20 63 | 68 61 72 2a 29 20 73 29 |signed c|har*) s)|
|00001200| 3b 0d 09 54 46 53 65 74 | 54 65 78 74 28 74 78 74 |;..TFSet|Text(txt|
|00001210| 2c 20 73 74 72 6c 65 6e | 28 73 29 2c 20 73 29 3b |, strlen|(s), s);|
|00001220| 0d 7d 0d 0d 0d 00 00 00 | 00 00 00 00 00 00 00 00 |.}......|........|
|00001230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001280| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00001290| 6e 65 20 43 61 6c 6c 53 | 6f 75 6e 64 50 72 6f 63 |ne CallS|oundProc|
|000012a0| 28 75 73 65 72 52 6f 75 | 74 69 6e 65 2c 20 73 6f |(userRou|tine, so|
|000012b0| 0e 53 74 64 54 65 78 74 | 46 69 65 6c 64 2e 63 2d |.StdText|Field.c-|
|000012c0| 02 00 00 00 54 45 58 54 | 4d 50 53 20 01 00 ff ff |....TEXT|MPS ....|
|000012d0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 00 00 af fb 3e ee 00 00 | 11 a5 00 00 01 ac 65 72 |....>...|......er|
|00001300| 52 6f 75 74 69 6e 65 2c | 20 74 68 65 44 69 61 6c |Routine,| theDial|
|00001310| 6f 67 2c 20 74 68 65 45 | 76 65 6e 74 2c 20 69 74 |og, theE|vent, it|
|00001320| 65 6d 48 69 74 29 09 09 | 5c 0d 09 09 28 2a 28 75 |emHit)..|\...(*(u|
|00001330| 73 65 72 52 6f 75 74 69 | 6e 65 29 29 28 28 74 68 |serRouti|ne))((th|
|00001340| 65 44 69 61 6c 6f 67 29 | 2c 20 28 74 68 65 45 76 |eDialog)|, (theEv|
|00001350| 65 6e 74 29 2c 20 28 69 | 74 65 6d 48 69 74 29 29 |ent), (i|temHit))|
|00001360| 0d 23 64 65 66 69 6e 65 | 20 43 61 6c 6c 55 73 65 |.#define| CallUse|
|00001370| 72 49 74 65 6d 50 72 6f | 63 28 75 73 65 72 52 6f |rItemPro|c(userRo|
|00001380| 00 00 00 48 00 09 47 65 | 6e 65 76 61 00 6f c8 50 |...H..Ge|neva.o.P|
|00001390| 03 df 8b 30 20 62 62 6f | 78 2c 20 72 3b 0d 09 6c |...0 bbo|x, r;..l|
|000013a0| 02 e4 ae 80 02 e4 00 03 | 00 08 00 64 00 1c 02 6d |........|...d...m|
|000013b0| 02 ed 00 64 00 1c 02 6d | 02 ed b0 5f 57 f9 00 00 |...d...m|..._W...|
|000013c0| 02 a5 00 00 02 a5 00 00 | 00 00 01 00 00 00 00 1e |........|........|
|000013d0| 00 64 00 1c 02 6d 02 ed | 00 64 00 1c 02 6d 02 ed |.d...m..|.d...m..|
|000013e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013f0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 03 d6 |.....n..|.n...>..|
|00001400| 71 38 26 32 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |q8&2....|.>..MPSR|
|00001410| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00001420| 03 f0 ff ff 00 00 00 4c | 03 d7 cc 04 00 00 00 00 |.......L|........|
|00001430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+